home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.20031118-20041115
/
000031_JDanSkinner@JDanSkinner.com_Tue Dec 2 09:31:17 2003.msg
< prev
next >
Wrap
Internet Message Format
|
2004-11-14
|
3KB
Path: newsmaster.cc.columbia.edu!phl-feed.news.verio.net!nntp1.tagonline.com!nycmny1-snf1.gtei.net!news.gtei.net!colt.net!newspump.monmouth.com!newspeer.monmouth.com!hermes.visi.com!news-out.visi.com!petbe.visi.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews1.google.com!not-for-mail
From: JDanSkinner@JDanSkinner.com (Dan Skinner)
Newsgroups: comp.protocols.kermit.misc
Subject: message to newexpectuser
Date: 1 Dec 2003 18:46:34 -0800
Organization: http://groups.google.com
Lines: 62
Message-ID: <8ce22d01.0312011846.dba6025@posting.google.com>
NNTP-Posting-Host: 24.159.192.106
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1070333194 21965 127.0.0.1 (2 Dec 2003 02:46:34 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 2 Dec 2003 02:46:34 +0000 (UTC)
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14707
Date: 2003-12-01 06:25:58 PST
newexpextuser asked
"What I don't understand is with the above "ftp rename \m(nameonly)
../ready/\m(nameonly)", how does this avoid moving the partial file
from the working directory to the ready directory, there will still be
a file in the working directory albeit a partial file and this command
will move it along to the ready directory."
Date: 2003-12-01 08:43:26 PST
Frank answers
"The lines preceding the "ftp rename" command are:
ftp put /delete \m(filename)
if fail exit 1 ftp put \m(filename): \v(ftp_message)
Thus the "ftp rename" command won't be reached if "ftp put" fails.
This is exactly the reason that we recommend that each critical step
be checked with IF FAIL -- you don't want the script to proceed in
cases where the subsequent commands require the preceding ones to
succeed.
Of course conditional command in the IF statement need not be EXIT; it
can be anything you want, even a series of commands, e.g.:
if fail {
command1
command2
...
} else { ; The ELSE part is optional
command1
command2
...
}
- Frank"
Date: 2003-12-01 09:52:52 PST
newexpextuser asked
"I appreciate your input.
However, I have gone through several articles on the website,
searching through the newsgroups and reviewing case studies and have
not found anything that addresses the issue I am having.
If there is online training or even classroom training, I'd find this
as being beneficial.
The case study I was pointed to, mentioned ftping a file to a central
server in a "working" directory where another script running on the
central server would look for files in a "ready" directory. I can
understand this concept, as it is obvious you wouldn't want to process
a file that is still being in transit.
It goes on to suggest of having the script move the file from the
working directory to the ready directory, but what if there is a
partial file there, it would still try to move this partial file and
try to process it."
Now my post:
We would be pleased to provide custom classroom training on Kermit scripting
Regards...Dan.
JDanSkinner.com